package com.code.train.exception;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * BusinessExpectionEnum
 * 业务类异常信息
 * @param
 * @author 南汉卿
 * @return
 * @date 2025/8/3 20:00
 */
@Getter
@AllArgsConstructor
public enum BusinessExceptionEnum {

    SUCCESS("200", "操作成功"),
    FAIL("500", "操作失败"),
    UNAUTHORIZED("401", "未认证"),
    FORBIDDEN("403", "无权限"),
    NOT_FOUND("404", "资源不存在"),
    VALIDATION_ERROR("400", "参数校验失败"),

    MEMBER_MOBILE_EXIST("10001", "手机号已经注册"),
    MEMBER_MOBILE_NOT_EXIST("10002", "手机号不能为空"),
    MEMBER_SEND_CODE_ERROR("10003","手机短信验证码错误" ),
    MEMBER_SEND_CODE_NOT_EXIST("10004","手机短信验证码失效,请重新获取验证码" ),
    MEMBER_SEND_CODE_PICTURE_ERROR("10005","验证码图片验证码生成失败"),
    MEMBER_SEND_CODE_PICTURE_NOT_EXIST("10006","图片验证码失效,请重新获取验证码"),

    BUSINESS_STATION_NAME_UNIQUE_ERROR("10007","车站已存在"),
    BUSINESS_TRAIN_CODE_UNIQUE_ERROR("10008","车次编号已存在"),
    BUSINESS_TRAIN_STATION_INDEX_UNIQUE_ERROR("10009","同车次站序已存在"),
    BUSINESS_TRAIN_STATION_NAME_UNIQUE_ERROR("10010","同车次站名已存在"),
    BUSINESS_TRAIN_CARRIAGE_INDEX_UNIQUE_ERROR("10011","同车次厢号已存在"),

    BUSINESS_TRAIN_CARRIAGE_NOT_EXIST("10012","车次厢号不存在"),
    CONFIRM_ORDER_TICKET_COUNT_ERROR("10013","余票不足"),
    CONFIRM_ORDER_AFTER_ERROR("10014","服务器忙请稍后重试" ),

    CONFIRM_ORDER_LOCK_ERROR("10015","业务繁忙，请稍后重试" ),
    CONFIRM_ORDER_FLOW_EXCEPTION("10016","当前抢票人数太多了，请稍候重试"),
    CONFIRM_ORDER_TICKET_TOKEN_COUNT_ERROR("10013","当前抢票人数过多，请5s之后尝试");


    private final String code;
    private final String desc;
}
